import request from '@/utils/request'

// 出库
export function postInStorage(data) {
    return request({
        url: '/inStorage/insertCarInStorage',
        method: 'post',
        data: data
    })
}

// 查询出库列表
export function queryList(query) {
    return request({
        url: '/outStorage/queryPageList',
        method: 'get',
        params: query
    })
}

// 查询出库详情
export function getOutstorageInfo(query) {
    return request({
        url: `/outStorage/${query}`,
        method: 'get',
        params: query
    })
}
// 查询合格证
export function getPurchaseQualifiedCard(purchaseNo, vinNo) {
  return request({
    url: `/qualifiedCard/getPurchaseQualifiedCard/${purchaseNo}/${vinNo}`,
    method: 'get',
  })
}
// 查询gps信息
export function carGpsInstall(query) {
  return request({
    url: `/inStorage/getCarGpsInfo`,
    method: 'get',
	params: query
  })
}
// 查询强度信息
export function getQuotaProductByOrderCar(orderCode, carModelName) {
  return request({
    url: `/quota/quotaCalcSchemeProduct/getQuotaProductByOrderCar/${orderCode}/${carModelName}`,
    method: 'get',
  })
}
// 查询gps信息
export function carGpsMonitoring(carId) {
  return request({
    url: `/inStorage/getCarGpsMonitoring/${carId}`,
    method: 'get',
  })
}
// 查询gps信息
export function carPrchaseTax(carId) {
  return request({
    url: `/inStorage/getCarPrchaseTax/${carId}`,
    method: 'get',
  })
}

// 查询年检
export function carInspection(carId) {
  return request({
    url: `/inStorage/getCarInspection/${carId}`,
    method: 'get',
  })
}
// 查询保险
export function carInsurance(carId, type) {
  return request({
    url: `/inStorage/getCarInsurance/${carId}/${type}`,
    method: 'get',
  })
}

// 查询年检时间
export function carInspectionNextTime(carId) {
  return request({
    url: `/inStorage/getInspectionNextTime/${carId}`,
    method: 'get',
  })
}
// 获取外部转租赁信息
export function externalublease(id) {
  return request({
    url: `/inStorage/getOutChange/${id}`,
    method: 'get'
  })
}

export function postOutstorage(data) {
  return request({
     url: '/outStorage/submit',
     method: 'post',
     data: data
   })
}
// 车库出库保存
export function insertCarOutStorage(data) {
  return request({
    url: '/outStorage/insertCarOutStorage',
    method: 'post',
    data: data
  })
}
